import 'package:json_annotation/json_annotation.dart';
part 'report_data.g.dart';

@JsonSerializable()
class ReportData {
  final int year;
  final List<ChartDataPoint> profitTrend;
  final List<ChartDataPoint> taxTrend;

  ReportData({required this.year, required this.profitTrend, required this.taxTrend});
  factory ReportData.fromJson(Map<String, dynamic> json) => _$ReportDataFromJson(json);
  Map<String, dynamic> toJson() => _$ReportDataToJson(this);
}

@JsonSerializable()
class ChartDataPoint {
  final String label;
  final double value;
  ChartDataPoint({required this.label, required this.value});
  factory ChartDataPoint.fromJson(Map<String, dynamic> json) => _$ChartDataPointFromJson(json);
  Map<String, dynamic> toJson() => _$ChartDataPointToJson(this);
}
